package com.example.cloudproduct.feign;

import com.example.cloudproduct.feign.fallback.StorgeFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 如果服务找不到的话 会走 我的 fallback方法
 */
@FeignClient(value = "storge-service", fallback = StorgeFeignFallBack.class)
public interface StorgeFeign {


    @GetMapping("/store/product/{productId}")
    String storeProduct(@PathVariable String productId);

}
